<template>
  <section>
    <yy-common-header></yy-common-header>
    <ol class="am-breadcrumb am-breadcrumb-slash">
      <li><a href="/">首页</a></li>
      <li><a href="/">分类</a></li>
      <li class="am-active">商品</li>
    </ol>
    <item :id="itemId"></item>
    <yy-right-side-bar></yy-right-side-bar>
  </section>
</template>

<script>

import YYCommonHeader from 'components/common/YYCommonHeader'
import YYRightSideBar from 'components/common/YYRightSideBar'

import Item from './components/Item'

import Util from 'util/util'

let ITEM_ID = null

export default {
  name: 'app',
  beforeCreate () {
    let itemId = Util.getQueryString('id')
    if (!itemId) {
      alert('非分的商品项')
      window.location.href = '/'
      return
    }
    ITEM_ID = itemId
  },
  mounted () {

  },
  data () {
    return {
      itemId: ITEM_ID
    }
  },
  components: {
    'yy-common-header': YYCommonHeader,
    'yy-right-side-bar': YYRightSideBar,
    'item': Item
  }
}
</script>

<style>

</style>
